/**
 * @name: 设置cookie
 * @author: camellia
 * @email: guanchao_gc@qq.com
 * @date: 2022-01-10
 */
export function SetCookie(sName:string, sValue:any) {
    document.cookie = sName + "=" + encodeURI(sValue) + "; ";
}
/**
 * @name: 读取cookie
 * @author: camellia
 * @email: guanchao_gc@qq.com
 * @date: 2022-01-10
 */
export function GetCookie(sName:string) {
    var aCookie = document.cookie.split("; ");
    for (var i = 0; i < aCookie.length; i++) {
        var aCrumb = aCookie[i].split("=");
        if (sName == aCrumb[0])
        {
            return encodeURIComponent(aCrumb[1]);
        }
    }
    return 0;
}